import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/Home.vue'),
    redirect: '/about',
    children: [{
      path: '/about',
      component: () => import('../views/About.vue')
    }, {
      path: '/userList',
      name: 'UserList',
      component: () => import('../views/UserList.vue')
    }]
  }
]

const router = new VueRouter({
  routes
})

export default router
